<?php /*a:6:{s:60:"E:\code\jiaoyou\application\admin\view\member\level_add.html";i:1598939753;s:57:"E:\code\jiaoyou\application\admin\view\public\header.html";i:1598939754;s:54:"E:\code\jiaoyou\application\admin\view\public\css.html";i:1598939754;s:53:"E:\code\jiaoyou\application\admin\view\public\js.html";i:1598939754;s:57:"E:\code\jiaoyou\application\admin\view\public\footer.html";i:1598939753;s:57:"E:\code\jiaoyou\application\admin\view\public\bottom.html";i:1598939754;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>后台系统</title>
<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/animate.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/style.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/ffxiang.css" />
<link rel="shortcut icon" href="http://jiaoyou.com\/style/admin/img/favicon.ico">
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/layui/layui.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/layui/css/layui.css" />
</head>
<style type="text/css">
    .gray-bg{ background: #fff; }
    .wrapper{ padding: 0;}
    .image-item { margin-bottom: 20px; height:284px; overflow: hidden; }
    .image-item div { width: 100%; margin-bottom: 10px; overflow:hidden; height: 200px; }
    .image-item div img { width: 100%; }
    .image-item button{ position: absolute; right: 15px; display: block; }
    #images-item {margin-left: 100px; margin-right: 100px;}
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <form class="form-horizontal" method="post">
            <div class="col-sm-12">
                <div class="ibox-content">

                    <div class="form-group">
                        <label class="col-sm-2 control-label">名称：</label>
                        <div class="col-sm-9">
                            <input type="text" name="name" class="form-control" value="<?php if(!empty($data['name'])): ?><?php echo htmlentities($data['name']); ?><?php endif; ?>" />
                        </div>
                    </div>

                    <div class="form-group">

                        <label class="col-sm-2 control-label">级别：</label>
                        <?php if($data['level']===0): ?>
                        <div class="col-sm-9">
                            <input type="text" name="level" class="form-control"  value="0" readonly="readonly"/>
                        </div>
                        <?php else: ?>
                        <div class="col-sm-9">
                           <input type="text" name="level" class="form-control"  value="<?php if(!empty($data['level'])): ?><?php echo htmlentities($data['level']); elseif($data['level']===0): ?>0<?php endif; ?>" oninput = "value=value.replace(/[^\d]/g,'')"/>
                        </div>
                        <?php endif; ?>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">描述：</label>
                        <div class="col-sm-9">
                            <input type="text" name="desc" class="form-control" value="<?php if(!empty($data['desc'])): ?><?php echo htmlentities($data['desc']); ?><?php endif; ?>" />
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">推荐：</label>
                        <div class="col-sm-9">
                            <select class="form-control" name="is_red">
                                <option value="0" <?php if($data['is_red']=='0'): ?>selected="selected"<?php endif; ?>>否</option>
                                <option value="1" <?php if($data['is_red']=='1'): ?>selected="selected"<?php endif; ?>>是</option>
                            </select>
                        </div>
                    </div>




                </div>
            </div>
        </form>
    </div>
</div>
     
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/content.min.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.css" />
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/ffxiangIndex.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/common.js"></script>
</body>
</html>
<!-- 引用控制层插件样式 -->
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/zyUpload/zyUpload.css" />
<!-- 引用核心层插件 -->
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/zyUpload/zyUpload.js"></script>
<script type="text/javascript">
layui.use('laydate',function () {
    layui.laydate.render({
        elem: '#date_range',
        min: 0,
        range: true
    });
});

</script>
<!--<script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/zyUpload/script.js?ver=20200527"></script>-->
<script type="text/javascript">
$(document).ready(function(){
    $("#button").click(function(){

      <?php 
      if((request()->controller()=='Article' && request()->action()=='add') || (request()->controller()=='Shop' && request()->action()=='add')){
       ?>

      var images='';
      <?php if(!empty($name)){ ?>
      $(".meiyouuimmag textarea").each(function(ret){
        var img=$(this).data('img');
        if(img){
          img_text=$(this).val();
          if(ret==0){
            images+='"'+img
          }else{
            images+=',"'+img
          }
        }
      });
      if(images){
        images="{"+images+"}";
        $('#images').val(images);
      }else{
        $('#images').val();
      }

      <?php }else{?>
       $(".meiyouuimmag textarea").each(function(ret){
        var img=$(this).data('img');
        if(img){
          img_text=$(this).val();
          if(ret==0){
            images+=''+img
          }else{
            images+=','+img
          }
        }
      });
      if(images){
        $('#images').val(images);
      }else{
        $('#images').val();
      }
        <?php }} 
if(input('?url')){
  echo 'loading("#button button")'."\r\n";
}
 ?>

        ajaxFun("POST","",$(".form-horizontal").serialize(),"json",function(ret){
            if(ret){
                if(ret.ret){
                    swal_msg(ret.ret,'',"success",<?php if(input('?url')){echo input('url');}else{echo 0;} ?>)
                    <?php 
if(input('?url')){
  echo 'loading("#button button",\'<i class="fa fa-check"></i> &nbsp;\'+ret.ret)';
}
 ?>

                    return false;
                }else{
                    layer.msg(ret.err)
                }
            }else{
                swal_msg("错误",ret,"error");
            }
            <?php 
if(input('?url')){
 ?>
loadingClose("#button button",'<i class="fa fa-check"></i> &nbsp;<?php if(isset($name)): ?>修改<?php else: ?>提交<?php endif; ?>')
<?php 
}
 ?>

        });
    });
});

function html2Escape(sHtml) {
 return sHtml.replace(/[<>&"]/g,function(c){return {'<':'&lt;','>':'&gt;','&':'&amp;','"':'&quot;'}[c];});
}
</script>
<style type="text/css">
.tbutton{ 
  position: fixed;
  bottom:0px;
  width: 100%;
  background: #fff;
  padding-top: 20px;
  padding-bottom: 20px;
  border-top: 1px solid #F5EFEF;
  z-index: 99999999999
}
#button{ width:120px; margin: 0 auto;}
.wrapper-content{ margin-bottom:75px;}
</style>

<div class="tbutton">
  <div id="button"><button class="btn btn-w-m btn-primary" type="button"><i class="fa fa-check"></i> &nbsp;<?php if(isset($name)): ?>修改<?php else: ?>提交<?php endif; ?></button></div>
</div>